﻿using System;
using Kiiro.Common.Interfaces;

namespace Kiiro.Common.Entities
{
    [Serializable]
    public class Attachment: BaseEntity, IEntity
    {
        #region Private Properties

        private string fileName;
        private byte[] bytes;
        private string iconUrl;
        private long fileLength;

        #endregion

        #region Public Properties

        public string FileName
        {
            get { return fileName; }
            set
            {
                if (fileName != value)
                {
                    fileName = value;
                    UpdateEntity();
                }
            }
        }


        public byte[] Bytes
        {
            get { return bytes; }
            set
            {
                if (bytes != value)
                {
                    bytes = value;
                    UpdateEntity();
                }
            }
        }

        public string IconUrl
        {
            get { return iconUrl; }
            set
            {
                if (iconUrl != value)
                {
                    iconUrl = value;
                    UpdateEntity();
                }
            }
        }

        public long FileLength
        {
            get { return fileLength; }
            set
            {
                if (fileLength != value)
                {
                    fileLength = value;
                    UpdateEntity();
                }
            }
        }


        #endregion

        #region IEntity Members

        #endregion
    }
}

/*************************************************************************
 * 
 * $Log: /Internal Projects/Kiiro/Kiiro.Common/Entities/Attachment.cs $
 * 
 * 4     12/02/09 12:29p Stefanf
 * 
 * 3     17/08/09 10:38a Camerons
 * Added check-in comments section
 * 
 ************************************************************************/